<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
  <title></title>
  <style type="text/css">
    *{margin:  0; padding: 0;}
    span{width: 50px;height: 50px;background: #ADADAD;float: left;width: 40%;margin: 5%;word-break: normal;word-wrap: break-word;}

  </style>
  <script type="text/javascript" src="https://unpkg.com/vue@2.4.1"></script>


  <script src="dist/vue-gesture.js"></script>
</head>

<body >
<div id = 'app'>
  <vue-gesture :type="'touchstart'"  :call="handleComponent.bind(this,'touchstart')" >touchstart</vue-gesture>
  <vue-gesture :type="'touchmove'"  :call="handleComponent.bind(this,'touchmove')" ><i>touchmove</i></vue-gesture>
  <vue-gesture :type="'touchend'"  :call="handleComponent.bind(this,'touchend')" >touchend</vue-gesture>
  <vue-gesture :type="'tab'"  :call="handleComponent.bind(this,'tab')" >tap</vue-gesture>
  <vue-gesture :type="'doubletap'"  :call="handleComponent.bind(this,'doubletap')">doubleTap</vue-gesture>
  <vue-gesture :type="'longTap'"  :call="handleComponent.bind(this,'longTap')">longTap</vue-gesture>
  <vue-gesture :type="'swipe'"  :call="handleComponent.bind(this,'swipe')">swipe</vue-gesture>
  <vue-gesture :type="'swipeLeft'"  :call="handleComponent.bind(this,'swipeLeft')">swipeLeft</vue-gesture>
  <vue-gesture :type="'swipeRight'"  :call="handleComponent.bind(this,'swipeRight')">swipeRight</vue-gesture>
  <vue-gesture :type="'swipeUp'"  :call="handleComponent.bind(this,'swipeUp')">swipeUp</vue-gesture>
  <vue-gesture :type="'swipeDown'"  :call="handleComponent.bind(this,'swipeDown')">swipeDown</vue-gesture>
  <vue-gesture :type="'click'"  :call="handleComponent.bind(this,'click')">click</vue-gesture>

</div>


<script type="text/javascript">
    

    new Vue({
  el: '#app',
    data: {
      message: 'Hello Vue.js!'
    },
    methods: {
        handleComponent: function(str,e){
            console.log(e);
            var html = e.srcElement.innerHTML;
            e.srcElement.innerHTML=html+" "+str;
            console.log(str);
        }
    }
  })

</script>
</body>
</html>